// 赠品列表
const {DataTypes, db } = require("../db");
db.define('send', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:'租户ID'}, 
buId:{type: DataTypes.INTEGER,allowNull:false,comment:'客户ID'}, 
invId:{type: DataTypes.INTEGER,allowNull:false,comment:'商品iD'}, 
sendInvId:{type: DataTypes.INTEGER,allowNull:false,comment:'赠送商品ID'}, 
buyQty:{type: DataTypes.FLOAT,allowNull:false,comment:'买数量'},
sendQty:{type: DataTypes.FLOAT,allowNull:false,comment:'赠送数量'},
calType:{type: DataTypes.STRING(50),comment:'按比例送/每满送'},
stat:{type: DataTypes.INTEGER,defaultValue:1,comment:'1有效0删除'}, 
isDel:{type: DataTypes.INTEGER,defaultValue:0,comment:'软删除 0/1'}, 
cby:{type: DataTypes.INTEGER,comment:'创建人ID'}, 
ctime:{type: DataTypes.STRING(20)},
uby:{type: DataTypes.INTEGER,comment:''}, 
utime:{type: DataTypes.STRING(20),comment:'更新时间'}, 
dby:{type: DataTypes.INTEGER,comment:'删除人ID'}, 
dtime:{type: DataTypes.STRING(20),comment:'删除时间'},
sendUnit:{type: DataTypes.STRING(10),comment:'赠品单位'},
}, {
    tableName: 'send',
    timestamps: false,
    comment: '赠品列表'
});